package cn.itsource.hrm.controller;

import cn.itsource.hrm.util.RedisUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jinhui
 * @version V1.0.0
 * @date 2020/5/24
 */
@RestController
public class RedisController {
    @GetMapping("/set")
    public void set(@RequestParam("key")String key,@RequestParam("value")String value){
        RedisUtils.INSTANCE.set(key,value);
    }
    @GetMapping("/get")
    public String get(@RequestParam("key")String key){
       return RedisUtils.INSTANCE.get(key);
    }
}

